<?php 
$calendarAutoIncreaseNumber = 1;
function generateAutoIncreaseNumber()
{
    global $calendarAutoIncreaseNumber;    
    if(!$calendarAutoIncreaseNumber){
        $calendarAutoIncreaseNumber = 1;
    }
    return $calendarAutoIncreaseNumber++;
}

$styleWidth = false;
if($view->settings['number_of_days'] == 7){
    $styleWidth = "500";
}
if($view->settings['number_of_days'] == 5){
    $styleWidth = "400";
}

?>
<div class="etceaster" <?php if($styleWidth){ ?> style="width: <?php echo $styleWidth;?>px;margin: 0 auto;"<?php } ?>>    
    <ul>
        <?php if($view->settings['number_of_days'] >= 10){ ?>
            <li onclick="webjs.showQuestionBox(22);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
            <li onclick="webjs.showQuestionBox(23);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
            <li onclick="webjs.showQuestionBox(24);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
        <?php } ?>
            
        <?php if($view->settings['number_of_days'] >= 7){ ?>                        
            <li onclick="webjs.showQuestionBox(25);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
            <li onclick="webjs.showQuestionBox(26);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
        <?php } ?>
        <li onclick="webjs.showQuestionBox(27);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
        <li onclick="webjs.showQuestionBox(28);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
        <li <?php if($view->settings['number_of_days'] == 7){?> style="margin-left: 68px;"<?php } ?> onclick="webjs.showQuestionBox(29);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
        <li <?php if($view->settings['number_of_days'] == 5){?> style="margin-left: 68px;"<?php } ?> onclick="webjs.showQuestionBox(30);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
        <li onclick="webjs.showQuestionBox(31);"><span><?php echo generateAutoIncreaseNumber(); ?></span></li>
    </ul>
</div>